<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>

	<title>vue prop 验证</title>
</head>
<body>
	<div id="app">
    <base-input
      label="姓名"
      class="username-input"
      placeholder="Enter your username"
      data-date-picker="activated"
    ></base-input>
 	</div>
</body>
</html>
<script type="text/javascript">
	
     Vue.component("base-input", {
        inheritAttrs: false, //此处设置禁用继承特性
        props: ["label"],
        template: `
          <label>
            {{ label }}
            <input v-bind="$attrs">
          </label>
        `,
        mounted: function() {
          console.log(this.$attrs);
        }
      });

     new Vue({
          el: '#app'
     });
</script>